package org.vectrics.recruiter.document;

import java.util.Locale;

import org.vectrics.common.db.CodedObject;
import org.vectrics.provider.CoreServiceLocator;

public class CandidateDocumentCategory implements CodedObject {
    public static final String CATEGORY_COVER_LETTER = "cover";

    public static final String CATEGORY_LETTER_OF_RECOMMENDATION = "recommend";

    public static final String CATEGORY_REFERENCE = "references";

    public static final String CATEGORY_RESUME = "resume";

    public static final String CATEGORY_UNKNOWN = "unknown";

    private String code = null;

    private String description = null;

    private String descriptionCode = null;

    /**
     * @return Returns the code.
     */
    public String getCode() {
        return this.code;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return this.description;
    }

    public String getDescription(Locale locale) {
        return CoreServiceLocator.getPhraseProvider().getMessage(this.getDescriptionCode(), locale);
    }

    /**
     * @return Returns the descriptionCode.
     */
    public String getDescriptionCode() {
        return this.descriptionCode;
    }

    /**
     * @param code
     *            The code to set.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @param descriptionCode
     *            The descriptionCode to set.
     */
    public void setDescriptionCode(String descriptionCode) {
        this.descriptionCode = descriptionCode;
    }

    @Override
    public String toString() {
        return (this.code);
    }

}
